﻿<Controls:SinacorWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                        xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
                        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
                        mc:Ignorable="d"
                        WindowStartupLocation="CenterScreen"
                        WindowState="Maximized"
                        Title="{DynamicResource Bovespa.Alocacao.Label.ConsultaZecomZe}"
                        x:Class="Sinacor.UI.Bovespa.Alocacao.View.SmartClient.ConsultaZecomZe"
                        ModulePlus="False"
                        ModuleId="ORD">

    <Controls:SinacorTabControl x:Name="tabItens"
                                IsSynchronizedWithCurrentItem="True">

        <!-- SINACOR -->
        <Controls:SinacorTabItem x:Name="tbiSinacor"
                                 Header="{DynamicResource Bovespa.Alocacao.Label.Sinacor}"
                                 IsTabStop="False">
            <Grid>
                <Controls:SinacorExpanderContainer HorizontalAlignment="Stretch"
                                                   VerticalAlignment="Stretch"
                                                   Grid.Row="0">

                    <Controls:SinacorExpanderContainer.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Controls:SinacorExpanderContainer.RowDefinitions>
                    <!--<Controls:SinacorExpanderContainer.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="330" />
                    </Controls:SinacorExpanderContainer.ColumnDefinitions>-->

                    <Controls:SinacorExpander x:Name="expPesquisaSI"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Width="Auto"
                                              Header="{DynamicResource Bovespa.Alocacao.Label.Pesquisa}"
                                              IsExpanded="True"
                                              Grid.Row="0">
                        <Grid>
                            <Controls:SinacorLabel x:Name="lblDataPregaoSI"
                                                   HorizontalAlignment="Left"
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.Pregao}"
                                                   Width="105"
                                                   VerticalAlignment="Top"
                                                   Margin="0,0,0,0"
                                                   HorizontalContentAlignment="Left" />
                            <Controls:SinacorComboBox x:Name="cmbPesquisaDataPregaoSI"
                                                      IsSynchronizedWithCurrentItem="True"
                                                      HorizontalAlignment="Left"
                                                      Margin="0,21,0,0"
                                                      Width="142"
                                                      VerticalAlignment="Top"
                                                      TabIndex="1"
                                                      ItemStringFormat="d"
                                                      ItemsSource="{Binding ListaDataPregaoSinacor}"
                                                      DisplayMemberPath="DataPregao"
                                                      SelectedValuePath="DataPregao"
                                                      IsRequired="True"
                                                      SelectedValue="{Binding Path=FiltroOcorrenciaSinacor.DataPregao}" />
                            <Controls:SinacorLabel x:Name="lblPesquisaClienteSI"
                                                   HorizontalAlignment="Left"
                                                   Width="131"
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.Cliente}"
                                                   VerticalAlignment="Top"
                                                   Margin="146,0,0,0"
                                                   Height="21"
                                                   HorizontalContentAlignment="Left" />
                            <Controls:SinacorInt32TextBox x:Name="txtPesquisaCliente"
                                                          HorizontalAlignment="Left"
                                                          Margin="146,21,0,0"
                                                          TabIndex="2"
                                                          Width="172"
                                                          VerticalAlignment="Top"
                                                          Value="{Binding Path=FiltroOcorrenciaSinacor.CodigoCliente}"
                                                          Integers="7"
                                                          MaxLength="7"
                                                          IsFormated="False"/>
                            <Controls:SinacorButton x:Name="btnPesquisaCliente"
                                                    HorizontalAlignment="Left"
                                                    Click="PesquisarCliente_Click"
                                                    Margin="322,21,0,0"
                                                    VerticalAlignment="Top"
                                                    TabIndex="3"
                                                    Icon="IconButtonClient"
                                                    ToolTip="{DynamicResource Bovespa.Alocacao.Label.PesquisarCliente}" />

                            <Controls:SinacorCheckBox x:Name="chkExcluirOrdensDiscricionariasSI"
                                                              VerticalAlignment="Top"
                                                              Width="281"
                                                              TabIndex="7"
                                                              Content="{DynamicResource Bovespa.Alocacao.Label.ExcluirOrdensDiscricionarias}"
                                                              IsChecked="False"
                                                              Margin="0,46,0,0" />

                            <Controls:SinacorLabel x:Name="LblPesquisaAtivoSI"
                                                   HorizontalAlignment="Left"
                                                   Width="115"
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.Ativo}"
                                                   VerticalAlignment="Top"
                                                   Margin="348,0,0,0"
                                                   HorizontalContentAlignment="Left" />
                            <Controls:SinacorTextBox x:Name="txtPesquisaAtivoSI"
                                                     HorizontalAlignment="Left"
                                                     Margin="348,21,0,0"
                                                     TabIndex="4"
                                                     Width="115"
                                                     VerticalAlignment="Top"
                                                     Text="{Binding FiltroOcorrenciaSinacor.Ativo}"
                                                     MaxLength="12"/>
                            <Controls:SinacorButton x:Name="btnPesquisaAtivoSI"
                                                    HorizontalAlignment="Left"
                                                    Icon="IconButtonSearch"
                                                    ToolTip="{DynamicResource Bovespa.Alocacao.Label.PesquisarAtivo}"
                                                    Margin="467,21,0,0"
                                                    VerticalAlignment="Top"
                                                    TabIndex="5"
                                                    Click="BtnPesquisarAtivoSI_Click" />
                            <Controls:SinacorLabel x:Name="lblPesquisaPrecoSI"
                                                   HorizontalAlignment="Left"
                                                   Width="100"
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.Preco}"
                                                   VerticalAlignment="Top"
                                                   Margin="494,0,0,0"
                                                   HorizontalContentAlignment="Left" />
                            <Controls:SinacorDecimalTextBox x:Name="txtPesquisaPrecoSI"
                                                            HorizontalAlignment="Left"
                                                            Margin="494,21,0,0"
                                                            VerticalAlignment="Top"
                                                            Decimals="8"
                                                            Width="198"
                                                            TabIndex="6"
                                                            Integers="11"
                                                            Value="{Binding FiltroOcorrenciaSinacor.Preco}" />
                            <Controls:SinacorButton x:Name="btnPesquisarSI"
                                                    HorizontalAlignment="Left"
                                                    Content="{DynamicResource Bovespa.Alocacao.Label.Pesquisar}"
                                                    Margin="752,46,0,0"
                                                    VerticalAlignment="Top"
                                                    IsDefault="True"
                                                    TabIndex="9"
                                                    Width="100"
                                                    CausesValidation="True"
                                                    Click="BtnPesquisarSI_Click" />
                            <Controls:SinacorButton x:Name="btnNovaPesquisaSI"
                                                    HorizontalAlignment="Left"
                                                    Margin="856,46,0,0"
                                                    Content="{DynamicResource Bovespa.Alocacao.Label.NovaPesquisa}"
                                                    TabIndex="10"
                                                    VerticalAlignment="Top"
                                                    Click="BtnNovaPesquisaSI_Click" />
                        </Grid>
                    </Controls:SinacorExpander>

                    <Controls:SinacorExpander x:Name="expOcorrenciasSI"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Header="{DynamicResource Bovespa.Alocacao.Label.Ocorrencias}"
                                              Grid.Row="1"
                                              Margin="0,4,0,0"
                                              IsExpanded="True">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="25" />
                            </Grid.RowDefinitions>
                            <Controls:SinacorDataGrid x:Name="dtgOcorrenciasSI"
                                                      HorizontalAlignment="Stretch"
                                                      Width="Auto"                                                      
                                                      RowEditMode="AllCells"
                                                      SelectionMode="Single"
                                                      VerticalAlignment="Stretch"
                                                      ItemsSource="{Binding Path=ListaOcorrenciasSinacor}"
                                                      ApplyingStyle="dtgOcorrenciasSI_ApplyingStyle"
                                                      BufferedSelectionChanged="dtgOcorrenciasSI_BufferedSelectionChanged">
                                <Controls:SinacorDataGrid.ContextMenuTemplate>
                                    <DataTemplate>
                                        <StackPanel>
                                            <Controls:SinacorContextMenuItem x:Name="ContextMenu_CancelarOcorrenciaSI"
                                                                             Header="{DynamicResource Bovespa.Alocacao.Label.CancelarOcorrencia}"
                                                                             Click="MenuCancelarOcorrenciaSI_Click"
                                                                             Loaded="ContextMenu_CancelarOcorrenciaSI_Loaded"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </Controls:SinacorDataGrid.ContextMenuTemplate>
                                <Controls:SinacorDataGrid.Columns>
                                    <Controls:Column Name="DataOSI" 
													 Title="Bovespa.Alocacao.Label.Data" 
													 DisplayMemberPath="DataNegocio" />
                                    <Controls:Column Name="OrdemOSI" 
													 Title="Bovespa.Alocacao.Label.Ordem" 
													 DisplayMemberPath="Ordem" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="ClienteOSI" 
													 Title="Bovespa.Alocacao.Label.Cliente" 
													 DisplayMemberPath="Apelido" />
                                    <Controls:Column Name="CNPJCPFOSI" 
													 Title="Bovespa.Alocacao.Label.CNPJCPF" 
													 DisplayMemberPath="CNPJCPF" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="BolsaOSI" 
													 Title="Bovespa.Alocacao.Label.Bolsa" 
													 DisplayMemberPath="Bolsa" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="AtivoOSI" 
													 Title="Bovespa.Alocacao.Label.Ativo" 
													 DisplayMemberPath="Ativo" />
                                    <Controls:Column Name="NegocioOSI" 
													 Title="Bovespa.Alocacao.Label.NNegoio" 
													 DisplayMemberPath="Negocio" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="NaturezaOSI" 
													 Title="Bovespa.Alocacao.Label.NatOper" 
													 DisplayMemberPath="NaturezaOperacao" />
                                    <Controls:Column Name="QuantidadeOSI" 
												 	 Title="Bovespa.Alocacao.Label.Quantidade" 
													 DisplayMemberPath="Quantidade" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="PrecoOSI" 
													 Title="Bovespa.Alocacao.Label.Preco" 
													 DisplayMemberPath="Preco" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="CodigoContraparteOSI" 
													 Title="Bovespa.Alocacao.Label.Contraparte" 
													 DisplayMemberPath="Contraparte" />
                                    <Controls:Column Name="UsuarioDirecionadoOSI" 
													 Title="Bovespa.Alocacao.Label.UsuarioDirecionado" 
													 DisplayMemberPath="UsuarioDirecionado" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="ClienteDirecionadoOSI" 
													 Title="Bovespa.Alocacao.Label.ClienteDirecionado" 
													 DisplayMemberPath="ClienteDirecionado" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="OperadorOSI" 
													 Title="Bovespa.Alocacao.Label.Operador" 
													 DisplayMemberPath="Operador" />
                                    <Controls:Column Name="PortaOSI" 
													 Title="Bovespa.Alocacao.Label.Porta" 
													 DisplayMemberPath="Porta" 
													 HorizontalCellAlignment="Right" />
                                </Controls:SinacorDataGrid.Columns>
                            </Controls:SinacorDataGrid>
                            <Grid HorizontalAlignment="Left"
                                  Grid.Row="1"
                                  VerticalAlignment="Top"
                                  Height="25">
                                <Controls:SinacorLabel HorizontalAlignment="Left"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.SituacaoNegocios}"
                                                       Width="145"
                                                       HorizontalContentAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness12}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         HorizontalAlignment="Left"
                                         Margin="147,7,0,0"
                                         VerticalAlignment="Top"
                                         Width="10"
                                         Height="10" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness12}"
                                                       HorizontalAlignment="Left"
                                                       Width="95"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.Cancelados}"
                                                       Margin="158,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness08}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         Margin="260,7,0,0"
                                         VerticalAlignment="Top"
                                         Height="10"
                                         Width="10"
                                         HorizontalAlignment="Left" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness08}"
                                                       HorizontalAlignment="Left"
                                                       Width="230"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.PodemSerCanceladosSolucionados}"
                                                       Margin="271,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness06}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         HorizontalAlignment="Left"
                                         Margin="508,7,0,0"
                                         VerticalAlignment="Top"
                                         Width="10"
                                         Height="10" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness06}"
                                                       Width="175"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.NaoPodemSerCancelados}"
                                                       Margin="519,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left"
                                                       HorizontalAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness13}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         HorizontalAlignment="Left"
                                         Margin="701,7,0,0"
                                         Width="10"
                                         Height="10"
                                         VerticalAlignment="Top" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness13}"
                                                       HorizontalAlignment="Left"
                                                       Width="181"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.SoPodemSerCancelados}"
                                                       Margin="712,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left" />
                            </Grid>
                        </Grid>
                    </Controls:SinacorExpander>

                    <Controls:SinacorExpander x:Name="expNegociosSolucaoSI"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Header="{DynamicResource Bovespa.Alocacao.Label.NegociosSolucao}"
                                              Grid.Row="2"
                                              Margin="0,4,0,0"
                                              IsExpanded="True">

                        <Controls:SinacorDataGrid x:Name="dtgSolucaoSI"
                                                  HorizontalAlignment="Stretch" 
                                                  ItemsSource="{Binding ListaSolucaoNegocioSinacor}"
                                                  Width="Auto" 
                                                  RowEditMode="AllCells"
                                                  SelectionMode="Multiple"
                                                  VerticalAlignment="Stretch">
                            <Controls:SinacorDataGrid.ContextMenuTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                        <Controls:SinacorContextMenuItem x:Name="MenuSolucionarOcorrencia" 
                                            	                             IsEnabled="False" 
                                                	                         Click="MenuSolucionarOcorrenciaSI_Click"
                                                    	                     Header="{DynamicResource Bovespa.Alocacao.Label.SolucionarOcorrencia}" 
                                                        	                 Loaded="MenuSolucionarOcorrenciaSI_Loaded" />
                                    </StackPanel>
                                </DataTemplate>
                            </Controls:SinacorDataGrid.ContextMenuTemplate>
                            <Controls:SinacorDataGrid.Columns>
                                <Controls:Column Name="DataSSI" 
												 Title="Bovespa.Alocacao.Label.Data" 
												 DisplayMemberPath="DataMovimento" />
                                <Controls:Column Name="OrdemSSI" 
												 Title="Bovespa.Alocacao.Label.Ordem" 
												 DisplayMemberPath="Ordem" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="ClienteSSI" 
												 Title="Bovespa.Alocacao.Label.Cliente" 
												 DisplayMemberPath="CodigoCliente" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="BolsaSSI" 
												 Title="Bovespa.Alocacao.Label.Bolsa" 
												 DisplayMemberPath="Bolsa" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="AtivoSSI" 
												 Title="Bovespa.Alocacao.Label.Ativo" 
												 DisplayMemberPath="Ativo" />
                                <Controls:Column Name="NegocioSSI" 
												 Title="Bovespa.Alocacao.Label.NNegoio" 
												 DisplayMemberPath="Negocio" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="NaturezaSSI" 
												 Title="Bovespa.Alocacao.Label.NatOper" 
												 DisplayMemberPath="NaturezaOperacao" />
                                <Controls:Column Name="QuantidadeSSI" 
												 Title="Bovespa.Alocacao.Label.QtdeRealNegocio" 
												 DisplayMemberPath="Quantidade" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="PrecoSSI" 
												 Title="Bovespa.Alocacao.Label.Preco" 
												 DisplayMemberPath="Preco" 
												 HorizontalCellAlignment="Right" />
                            </Controls:SinacorDataGrid.Columns>
                        </Controls:SinacorDataGrid>
                    </Controls:SinacorExpander>

                </Controls:SinacorExpanderContainer>
            </Grid>
        </Controls:SinacorTabItem>

        <!-- CENTRAL DEPOSITARIA -->
        <Controls:SinacorTabItem x:Name="tbiCentralDepositaria"
                                 Header="{DynamicResource Bovespa.Alocacao.Label.CentralDepositaria}"
                                 IsTabStop="False">
            <Grid>
                <Controls:SinacorExpanderContainer HorizontalAlignment="Stretch"
                                                   VerticalAlignment="Stretch"
                                                   Grid.Row="0">

                    <Controls:SinacorExpanderContainer.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Controls:SinacorExpanderContainer.RowDefinitions>
                    <!--<Controls:SinacorExpanderContainer.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="330" />
                    </Controls:SinacorExpanderContainer.ColumnDefinitions>-->

                    <Controls:SinacorExpander x:Name="expPesquisaCD"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Width="Auto"
                                              Header="{DynamicResource Bovespa.Alocacao.Label.Pesquisa}"
                                              IsExpanded="True"
                                              Grid.Row="0">
                        <Grid Height="Auto">
                            <Controls:SinacorLabel x:Name="lblDataPregaoCD"
                                                   HorizontalAlignment="Left"
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.Pregao}"
                                                   Width="77"
                                                   VerticalAlignment="Top"
                                                   Margin="0,0,0,0"
                                                   HorizontalContentAlignment="Left" />
                            <Controls:SinacorComboBox x:Name="cmbPesquisaDataPregaoCD"
                                                      IsSynchronizedWithCurrentItem="True"
                                                      HorizontalAlignment="Left"
                                                      Margin="0,21,0,0"
                                                      Width="135"
                                                      VerticalAlignment="Top"
                                                      TabIndex="11"
                                                      ItemStringFormat="d"
                                                      ItemsSource="{Binding ListaDataPregaoCentralDepositaria}"
                                                      DisplayMemberPath="DataPregao"
                                                      SelectedValuePath="DataPregao"
                                                      IsRequired="True"
                                                      SelectedValue="{Binding Path=FiltroOcorrenciaCentralDepositaria.DataPregao}" />
                            <Controls:SinacorLabel x:Name="LblPesquisaAtivoCD"
                                                   HorizontalAlignment="Left"
                                                   Width="70"
                                                   Height="21"
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.Ativo}"
                                                   VerticalAlignment="Top"
                                                   Margin="139,0,0,0"
                                                   HorizontalContentAlignment="Left" />
                            <Controls:SinacorTextBox x:Name="txtPesquisaAtivoCD"
                                                     HorizontalAlignment="Left"
                                                     Margin="139,21,0,0"
                                                     TabIndex="12"
                                                     Width="152"
                                                     Text="{Binding FiltroOcorrenciaCentralDepositaria.Ativo}"
                                                     MaxLength="12" VerticalAlignment="Top" />
                            <Controls:SinacorButton x:Name="btnPesquisaAtivoCD"
                                                    HorizontalAlignment="Left"
                                                    Icon="IconButtonSearch"
                                                    ToolTip="{DynamicResource Bovespa.Alocacao.Label.PesquisarAtivo}"
                                                    Margin="296,21,0,0"
                                                    VerticalAlignment="Top"
                                                    TabIndex="13"
                                                    Click="BtnPesquisarAtivoCD_Click" />
                            <Controls:SinacorLabel x:Name="lblPesquisaNegocioCD"
                                                   Width="77"
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.NNegoio}"
                                                   VerticalAlignment="Top"
                                                   Margin="323,0,0,21"
                                                   HorizontalContentAlignment="Left"
                                                   HorizontalAlignment="Left" />
                            <Controls:SinacorInt32TextBox x:Name="txtPesquisaNegocioCD"
                                                          TabIndex="14"
                                                          Width="130"
                                                          HorizontalAlignment="Left"
                                                          VerticalAlignment="Top"
                                                          Value="{Binding FiltroOcorrenciaCentralDepositaria.Negocio}"
                                                          MaxLength="9" 
                                                          Integers="9" Margin="323,21,0,0" />
                            <Controls:SinacorCheckBox x:Name="chkExcluirOrdensDiscricionariasCD"
                                                              VerticalAlignment="Top"
                                                              Width="281"
                                                              TabIndex="16"
                                                              Content="{DynamicResource Bovespa.Alocacao.Label.ExcluirOrdensDiscricionarias}"
                                                              IsChecked="False" 
															  Margin="457,21,0,0" />
                            <Controls:SinacorCheckBox x:Name="chkIncluirNegociosCanceladosCD"
                                                              Width="215"
                                                              TabIndex="17"
                                                              Content="{DynamicResource Bovespa.Alocacao.Label.IncluirNegociosCancelados}"
                                                              HorizontalAlignment="Left"
                                                              Margin="739,21,0,0"
                                                              IsChecked="False"
                                                              VerticalAlignment="Top" />
                            <Controls:SinacorButton x:Name="btnPesquisarCD"
                                                    HorizontalAlignment="Left"
                                                    Content="{DynamicResource Bovespa.Alocacao.Label.Pesquisar}"
                                                    Margin="746,46,0,0"
                                                    VerticalAlignment="Top"
                                                    IsDefault="True"
                                                    TabIndex="18"
                                                    Click="BtnPesquisarCD_Click" RenderTransformOrigin="0.5,0.369" Width="100" />
                            <Controls:SinacorButton x:Name="btnNovaPesquisaCD"
                                                    HorizontalAlignment="Left"
                                                    Margin="850,46,0,0"
                                                    Content="{DynamicResource Bovespa.Alocacao.Label.NovaPesquisa}"
                                                    TabIndex="17"
                                                    VerticalAlignment="Top"
                                                    Click="BtnNovaPesquisaCD_Click" Width="100" />
                        </Grid>
                    </Controls:SinacorExpander>

                    <Controls:SinacorExpander x:Name="ExpImportacao"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Width="Auto"
                                              Header="{DynamicResource Bovespa.Alocacao.Label.Importacao}"
                                              IsExpanded="True"
                                              Grid.Row="1" Height="Auto">
                        <Grid Height="Auto">

                            <Controls:SinacorFilePicker x:Name="FlpAlocacaoImportacao"
                                                        HorizontalAlignment="Left"
                                                        Margin="307,0,0,0"
                                                        VerticalAlignment="Top"
                                                        Width="645"
                                                        WidthPath="568"
                                                        TabIndex="15" 
                                                        Value="{Binding FiltroOcorrenciaCentralDepositaria.Arquivo}"
                                                        Filter="XLS|*.xls"
                                                        ValidateIfPathExists="True"/>
                            <Controls:SinacorLabel HorizontalAlignment="Left" 
                                                   Content="{DynamicResource Bovespa.Alocacao.Label.Layout}" 
                                                   Width="81"
                                                   Margin="0,0,0,0"/>

                            <Controls:SinacorComboBox x:Name="CboLayoutsImportacao"
                                                      IsSynchronizedWithCurrentItem="True"
													  HorizontalAlignment="Left" 
													  VerticalAlignment="Top" 
                                                      Margin="85,0,0,0" 
                                                      Width="144"
                                                      IsRequired="True"/>
                            <Controls:SinacorLabel HorizontalAlignment="Left"
                            					   Width="70"
                            					   Content="{DynamicResource Bovespa.Alocacao.Label.Arquivo}"
                            					   VerticalAlignment="Top"
                            					   Margin="233,0,0,0"
                            					   HorizontalContentAlignment="Right" 
												   VerticalContentAlignment="Bottom" />
                            <Controls:SinacorGroupBox VerticalAlignment="Stretch" 
													  Header="{DynamicResource Bovespa.Alocacao.Label.Status}" 
													  Margin="0,25,0,0" 
													  Width="Auto" 
													  Height="Auto">
                                <Grid>
                                    <Controls:SinacorProgressBar x:Name="PgbAlocacaoProgresso"
                                                                 Margin="0,0,0,0" 
															     VerticalAlignment="Top" 
															     Height="10" 
															     HorizontalAlignment="Left" 
															     Width="730"
                                                                 Value="{Binding StatusProcesso.Progress}"/>
                                    <Controls:SinacorButton HorizontalAlignment="Left" 
														Margin="738,0,0,0" 
														Content="{DynamicResource Bovespa.Alocacao.Label.Importar}" 
														VerticalAlignment="Top"
                                                        x:Name="BtnAlocacaoImportacao"/>
                                    <Controls:SinacorButton HorizontalAlignment="Left" 
														Margin="842,0,0,0" 
														Content="{DynamicResource Bovespa.Alocacao.Label.Cancelar}" 
														VerticalAlignment="Top"
                                                        IsEnabled ="False"
                                                        x:Name="BtnCancelarImportacao"/>

                                </Grid>
                            </Controls:SinacorGroupBox>
                        </Grid>
                    </Controls:SinacorExpander>
                    <Controls:SinacorExpander x:Name="expOcorrenciasCD"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Header="{DynamicResource Bovespa.Alocacao.Label.Ocorrencias}"
                                              Grid.Row="2"
                                              Margin="0,4,0,0"
                                              IsExpanded="True">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="25" />
                            </Grid.RowDefinitions>
                            <Controls:SinacorDataGrid x:Name="dtgOcorrenciasCD"
                                                      HorizontalAlignment="Stretch"
                                                      Width="Auto"
                                                      IsSynchronizedWithCurrentItem="True"
                                                      RowEditMode="AllCells"
                                                      SelectionMode="Single"
                                                      VerticalAlignment="Stretch"
                                                      ItemsSource="{Binding Path=ListaOcorrenciasCentralDepositaria}"
                                                      ApplyingStyle="dtgOcorrenciasCD_ApplyingStyle"
                                                      BufferedSelectionChanged="dtgOcorrenciasCD_BufferedSelectionChanged">

                                <Controls:SinacorDataGrid.ContextMenuTemplate>
                                    <DataTemplate>
                                        <StackPanel>
                                            <Controls:SinacorContextMenuItem x:Name="ContextMenu_CancelarOcorrenciaCD"
                                                                             Header="{DynamicResource Bovespa.Alocacao.Label.CancelarOcorrencia}"
                                                                             Click="MenuCancelarOcorrenciaCD_Click"
                                                                             Loaded="ContextMenu_CancelarOcorrenciaCD_Loaded" />
                                        </StackPanel>
                                    </DataTemplate>
                                </Controls:SinacorDataGrid.ContextMenuTemplate>
                                <Controls:SinacorDataGrid.Columns>
                                    <Controls:Column Name="DataOCD" 
													 Title="Bovespa.Alocacao.Label.Data" 
													 DisplayMemberPath="DataMovimento" />
                                    <Controls:Column Name="OrdemOCD" 
													 Title="Bovespa.Alocacao.Label.Ordem" 
													 DisplayMemberPath="Ordem" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="ClienteOCD" 
													 Title="Bovespa.Alocacao.Label.Cliente" 
													 DisplayMemberPath="Apelido" />
                                    <Controls:Column Name="CNPJCPFOCD" 
													 Title="Bovespa.Alocacao.Label.CNPJCPF" 
													 DisplayMemberPath="CNPJCPF" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="BolsaOCD" 
													 Title="Bovespa.Alocacao.Label.Bolsa" 
													 DisplayMemberPath="Bolsa" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="AtivoOCD" 
													 Title="Bovespa.Alocacao.Label.Ativo" 
													 DisplayMemberPath="Ativo" />
                                    <Controls:Column Name="NegocioOCD" 
													 Title="Bovespa.Alocacao.Label.NNegoio" 
													 DisplayMemberPath="Negocio" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="NaturezaOCD" 
													 Title="Bovespa.Alocacao.Label.NatOper" 
													 DisplayMemberPath="NaturezaOperacao" />
                                    <Controls:Column Name="QuantidadeOCD" 
													 Title="Bovespa.Alocacao.Label.Quantidade" 
													 DisplayMemberPath="Quantidade" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="QtdeRealNegocioOCD" 
													 Title="Bovespa.Alocacao.Label.QtdeRealNegocio" 
													 DisplayMemberPath="QuantidadeNegocio" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="PrecoOCD" 
													 Title="Bovespa.Alocacao.Label.Preco" 
													 DisplayMemberPath="Preco" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="CodigoContraparteOCD" 
													 Title="Bovespa.Alocacao.Label.Contraparte" 
													 DisplayMemberPath="Contraparte" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="UsuarioDirecionadoOCD" 
													 Title="Bovespa.Alocacao.Label.UsuarioDirecionado" 
													 DisplayMemberPath="UsuarioDirecionado" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="ClienteDirecionadoOCD" 
													 Title="Bovespa.Alocacao.Label.ClienteDirecionado" 
													 DisplayMemberPath="ClienteDirecionado" 
													 HorizontalCellAlignment="Right" />
                                    <Controls:Column Name="OperadorOCD" 
													 Title="Bovespa.Alocacao.Label.Operador" 
													 DisplayMemberPath="Operador" />
                                    <Controls:Column Name="PortaOCD" 
													 Title="Bovespa.Alocacao.Label.Porta" 
													 DisplayMemberPath="Porta" 
													 HorizontalCellAlignment="Right" />
                                </Controls:SinacorDataGrid.Columns>
                            </Controls:SinacorDataGrid>
                            <Grid HorizontalAlignment="Left"
                                  Grid.Row="1"
                                  VerticalAlignment="Top"
                                  Height="25">
                                <Controls:SinacorLabel HorizontalAlignment="Left"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.SituacaoNegocios}"
                                                       Width="145"
                                                       HorizontalContentAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness12}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         HorizontalAlignment="Left"
                                         Margin="147,7,0,0"
                                         VerticalAlignment="Top"
                                         Width="10"
                                         Height="10" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness12}"
                                                       HorizontalAlignment="Left"
                                                       Width="95"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.Cancelados}"
                                                       Margin="158,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness08}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         Margin="260,7,0,0"
                                         VerticalAlignment="Top"
                                         Height="10"
                                         Width="10"
                                         HorizontalAlignment="Left" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness08}"
                                                       HorizontalAlignment="Left"
                                                       Width="230"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.PodemSerCanceladosSolucionados}"
                                                       Margin="271,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness06}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         HorizontalAlignment="Left"
                                         Margin="508,7,0,0"
                                         VerticalAlignment="Top"
                                         Width="10"
                                         Height="10" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness06}"
                                                       Width="175"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.NaoPodemSerCancelados}"
                                                       Margin="519,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left"
                                                       HorizontalAlignment="Left" />
                                <Ellipse Fill="{DynamicResource BrushGridRowBusiness13}"
                                         Stroke="{DynamicResource BrushGridRowBusiness10}"
                                         HorizontalAlignment="Left"
                                         Margin="701,7,0,0"
                                         Width="10"
                                         Height="10"
                                         VerticalAlignment="Top" />
                                <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness13}"
                                                       HorizontalAlignment="Left"
                                                       Width="181"
                                                       Content="{DynamicResource Bovespa.Alocacao.Label.SoPodemSerCancelados}"
                                                       Margin="712,0,0,0"
                                                       VerticalAlignment="Top"
                                                       HorizontalContentAlignment="Left" />
                            </Grid>
                        </Grid>
                    </Controls:SinacorExpander>

                    <Controls:SinacorExpander x:Name="expNegociosSolucaoCD"
                                              HorizontalAlignment="Stretch"
                                              VerticalAlignment="Stretch"
                                              Header="{DynamicResource Bovespa.Alocacao.Label.NegociosSolucao}"
                                              Grid.Row="3"
                                              Margin="0,4,0,0"
                                              IsExpanded="True">

                        <Controls:SinacorDataGrid x:Name="dtgSolucaoCD"
                                                  HorizontalAlignment="Stretch"
                                                  ItemsSource="{Binding ListaSolucaoNegocioCentDepositaria}"
                                                  Width="Auto"
                                                  RowEditMode="AllCells"
                                                  SelectionMode="Extended"
                                                  VerticalAlignment="Stretch">
                            <Controls:SinacorDataGrid.ContextMenuTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                        <Controls:SinacorContextMenuItem x:Name="ContextMenu_SolucionarOcorrencia"
                                                                         Header="{DynamicResource Bovespa.Alocacao.Label.SolucionarOcorrencia}"
                                                                         Click="MenuSolucionarOcorrenciaCD_Click"
                                                                         Loaded="MenuSolucionarOcorrenciaCD_Loaded"/>
                                    </StackPanel>
                                </DataTemplate>
                            </Controls:SinacorDataGrid.ContextMenuTemplate>
                            <Controls:SinacorDataGrid.Columns>
                                <Controls:Column Name="DataSCD" 
												 Title="Bovespa.Alocacao.Label.Data" 
												 DisplayMemberPath="DataMovimento" />
                                <Controls:Column Name="OrdemSCD" 
												 Title="Bovespa.Alocacao.Label.Ordem" 
												 DisplayMemberPath="Ordem" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="ClienteSCD" 
												 Title="Bovespa.Alocacao.Label.Cliente" 
												 DisplayMemberPath="CodigoCliente" />
                                <Controls:Column Name="BolsaSCD" 
												 Title="Bovespa.Alocacao.Label.Bolsa" 
												 DisplayMemberPath="Bolsa" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="AtivoSCD" 
											 	 Title="Bovespa.Alocacao.Label.Ativo" 
												 DisplayMemberPath="Ativo" />
                                <Controls:Column Name="NegocioSCD" 
												 Title="Bovespa.Alocacao.Label.NNegoio" 
												 DisplayMemberPath="Negocio" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="NaturezaSCD" 
												 Title="Bovespa.Alocacao.Label.NatOper" 
												 DisplayMemberPath="NaturezaOperacao" />
                                <Controls:Column Name="QuantidadeSCD" 
												 Title="Bovespa.Alocacao.Label.QtdeRealNegocio" 
												 DisplayMemberPath="Quantidade" 
												 HorizontalCellAlignment="Right" />
                                <Controls:Column Name="PrecoSCD" 
												 Title="Bovespa.Alocacao.Label.Preco" 
												 DisplayMemberPath="Preco" 
												 HorizontalCellAlignment="Right" />
                            </Controls:SinacorDataGrid.Columns>
                        </Controls:SinacorDataGrid>
                    </Controls:SinacorExpander>

                </Controls:SinacorExpanderContainer>
            </Grid>
        </Controls:SinacorTabItem>

    </Controls:SinacorTabControl>

</Controls:SinacorWindow>